3.1.97 \(\int \frac {(a+b \log (c x^n)) \log (d (e+f x^2)^m)}{x^2} \, dx\) [97]

Optimal. Leaf size=179 \[ \frac {2 b \sqrt {f} m n \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {i b \sqrt {f} m n \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}} \]

[Out]

-b*n*ln(d*(f*x^2+e)^m)/x-(a+b*ln(c*x^n))*ln(d*(f*x^2+e)^m)/x+2*b*m*n*arctan(x*f^(1/2)/e^(1/2))*f^(1/2)/e^(1/2)
+2*m*arctan(x*f^(1/2)/e^(1/2))*(a+b*ln(c*x^n))*f^(1/2)/e^(1/2)-I*b*m*n*polylog(2,-I*x*f^(1/2)/e^(1/2))*f^(1/2)
/e^(1/2)+I*b*m*n*polylog(2,I*x*f^(1/2)/e^(1/2))*f^(1/2)/e^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 179, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2505, 211, 2423, 4940, 2438} \begin {gather*} -\frac {i b \sqrt {f} m n \text {PolyLog}\left (2,-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {PolyLog}\left (2,\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {2 \sqrt {f} m \text {ArcTan}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}+\frac {2 b \sqrt {f} m n \text {ArcTan}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x^2,x]

[Out]

(2*b*Sqrt[f]*m*n*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/Sqrt[e] + (2*Sqrt[f]*m*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*(a + b*Log[c*
x^n]))/Sqrt[e] - (b*n*Log[d*(e + f*x^2)^m])/x - ((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x - (I*b*Sqrt[f]*m*n
*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]])/Sqrt[e] + (I*b*Sqrt[f]*m*n*PolyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/Sqrt[e]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2423

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2505

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.)*(x_))^(m_.), x_Symbol] :> Simp[(f*x)^(m +
 1)*((a + b*Log[c*(d + e*x^n)^p])/(f*(m + 1))), x] - Dist[b*e*n*(p/(f*(m + 1))), Int[x^(n - 1)*((f*x)^(m + 1)/
(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && NeQ[m, -1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x^2} \, dx &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-(b n) \int \left (\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} x}-\frac {\log \left (d \left (e+f x^2\right )^m\right )}{x^2}\right ) \, dx\\ &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}+(b n) \int \frac {\log \left (d \left (e+f x^2\right )^m\right )}{x^2} \, dx-\frac {\left (2 b \sqrt {f} m n\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}\\ &=\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (i b \sqrt {f} m n\right ) \int \frac {\log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}+\frac {\left (i b \sqrt {f} m n\right ) \int \frac {\log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{x} \, dx}{\sqrt {e}}+(2 b f m n) \int \frac {1}{e+f x^2} \, dx\\ &=\frac {2 b \sqrt {f} m n \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {2 \sqrt {f} m \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {b n \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{x}-\frac {i b \sqrt {f} m n \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}+\frac {i b \sqrt {f} m n \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 305, normalized size = 1.70 \begin {gather*} \frac {2 a \sqrt {f} m x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )+2 b \sqrt {f} m n x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-2 b \sqrt {f} m n x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \log (x)+2 b \sqrt {f} m x \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \log \left (c x^n\right )+i b \sqrt {f} m n x \log (x) \log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )-i b \sqrt {f} m n x \log (x) \log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )-a \sqrt {e} \log \left (d \left (e+f x^2\right )^m\right )-b \sqrt {e} n \log \left (d \left (e+f x^2\right )^m\right )-b \sqrt {e} \log \left (c x^n\right ) \log \left (d \left (e+f x^2\right )^m\right )-i b \sqrt {f} m n x \text {Li}_2\left (-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+i b \sqrt {f} m n x \text {Li}_2\left (\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])*Log[d*(e + f*x^2)^m])/x^2,x]

[Out]

(2*a*Sqrt[f]*m*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]] + 2*b*Sqrt[f]*m*n*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]] - 2*b*Sqrt[f]*m*n
*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*Log[x] + 2*b*Sqrt[f]*m*x*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*Log[c*x^n] + I*b*Sqrt[f]*m
*n*x*Log[x]*Log[1 - (I*Sqrt[f]*x)/Sqrt[e]] - I*b*Sqrt[f]*m*n*x*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sqrt[e]] - a*Sqrt[
e]*Log[d*(e + f*x^2)^m] - b*Sqrt[e]*n*Log[d*(e + f*x^2)^m] - b*Sqrt[e]*Log[c*x^n]*Log[d*(e + f*x^2)^m] - I*b*S
qrt[f]*m*n*x*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]] + I*b*Sqrt[f]*m*n*x*PolyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/(Sqrt
[e]*x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.17, size = 1972, normalized size = 11.02

method result size
risch \(\text {Expression too large to display}\) \(1972\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(f*x^2+e)^m)/x^2,x,method=_RETURNVERBOSE)

[Out]

-ln(d)*b/x*ln(x^n)+1/2*I*Pi*csgn(I*d*(f*x^2+e)^m)^3/x*b*ln(c)+1/2*I*Pi*csgn(I*d*(f*x^2+e)^m)^3*b/x*ln(x^n)-1/2
*I/x*Pi*ln(d)*b*csgn(I*c)*csgn(I*c*x^n)^2+2*m*f/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*b*ln(c)-1/4*Pi^2*csgn(I*d)
*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)/x*b*csgn(I*c)*csgn(I*c*x^n)^2+1/2*I*Pi*csgn(I*d)*csgn(I*(f*x^2+e)^m
)*csgn(I*d*(f*x^2+e)^m)/x*b*ln(c)-1/2*I*Pi*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2/x*a+2*m*f*b/(e*f)^(1/2)
*arctan(x*f/(e*f)^(1/2))*ln(x^n)-1/x*ln(d)*a+(-b/x*ln(x^n)-1/2*(-I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+I*
b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*c*x^n)^3+2*b*ln(c)+2*b*n+2*a)/
x)*ln((f*x^2+e)^m)-1/2*I*Pi*csgn(I*d)*csgn(I*d*(f*x^2+e)^m)^2/x*b*ln(c)+1/4*Pi^2*csgn(I*d*(f*x^2+e)^m)^3/x*b*c
sgn(I*c*x^n)^3+1/2*I*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og((f*x+(-e*f)^(1/2))/(-e*f)^(1/2))+1/2*I/x*Pi*ln(d)*b*csgn(I*c)*csgn
(I*x^n)*csgn(I*c*x^n)-I*m*f/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+2*m*f
/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*b*n+m*f*b*n/(-e*f)^(1/2)*dilog((-f*x+(-e*f)^(1/2))/(-e*f)^(1/2))-1/2*I*Pi
*csgn(I*d)*csgn(I*d*(f*x^2+e)^m)^2*b/x*ln(x^n)-1/2*I*Pi*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2*b/x*ln(x^n
)-1/2*I*Pi*csgn(I*(f*x^2+e)^m)*csgn(I*d*(f*x^2+e)^m)^2*b*n/x

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="maxima")

[Out]

-(b*m*log(x^n) + (m*n + m*log(c))*b + a*m)*log(f*x^2 + e)/x + integrate((((2*f*m + f*log(d))*a + (2*f*m*n + (2
*f*m + f*log(d))*log(c))*b)*x^2 + (b*log(c)*log(d) + a*log(d))*e + ((2*f*m + f*log(d))*b*x^2 + b*e*log(d))*log
(x^n))/(f*x^4 + x^2*e), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)*log((f*x^2 + e)^m*d)/x^2, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(f*x**2+e)**m)/x**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m)/x^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x^2 + e)^m*d)/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,{\left (f\,x^2+e\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n)))/x^2,x)

[Out]

int((log(d*(e + f*x^2)^m)*(a + b*log(c*x^n)))/x^2, x)

________________________________________________________________________________________